﻿<phone:PhoneApplicationPage 
    x:Class="AACalc.AttendeeEditPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
    xmlns:telerikDataForm="clr-namespace:Telerik.Windows.Controls.DataForm;assembly=Telerik.Windows.Controls.Input"
    xmlns:models="clr-namespace:AACalc.Models"
    xmlns:helpers="clr-namespace:AACalc.Helpers"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="728" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="PageTitle" Text="Attendee" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <Grid Grid.Row="1" Margin="0,6,0,6">
            <ScrollViewer>
                <telerikInput:RadDataForm Grid.Row="1" Margin="12,0,12,12" x:Name="DataForm" EditorCreationMode="CreateByDefault">
                    <telerikInput:RadDataForm.CurrentItem>
                        <models:AttendeeEditorDataModel/>
                    </telerikInput:RadDataForm.CurrentItem>
                    <Grid>
                        <telerikInput:DataField Header="Name" TargetProperty="Name">
                            <telerikInput:DataField.Validators>
                                <telerikInput:NonEmptyStringValidator/>
                            </telerikInput:DataField.Validators>
                        </telerikInput:DataField>
                        <telerikInput:DataField Header="Payed:" TargetProperty="Payed"/>
                    </Grid>
                </telerikInput:RadDataForm>
            </ScrollViewer>
        </Grid>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/DateTimePickerOk.png" Text="Ok" Click="ApplicationBarIconButton_Click"/>
            <shell:ApplicationBarIconButton IconUri="/Images/DateTimePickerCancel.png" Text="Cancel"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>